{% extends 'dashboard/layout.html' %}
{% load currency_filters %}
{% load i18n %}

{% block body_class %}{{ block.super }} create-page{% endblock %}

{% block title %}
    {% blocktrans with name=voucher.name %}Delete voucher '{{ name }}'?{% endblocktrans %} | {% trans "Vouchers" %} | {{ block.super }}
{% endblock %}

{% block breadcrumbs %}
    <ul class="breadcrumb">
        <li>
            <a href="{% url 'dashboard:index' %}">{% trans "Dashboard" %}</a>
        </li>
        <li>
            <a href="{% url 'dashboard:voucher-list' %}">{% trans "Vouchers" %}</a>
        </li>
        <li>
            <a href="{% url 'dashboard:voucher-stats' pk=voucher.pk %}">{{ voucher }}</a>
        </li>
        <li class="active">{% trans "Delete?" %}</li>
    </ul>
{% endblock %}

{% block headertext %}
    {% blocktrans with name=voucher.name %}Delete voucher '{{ name }}'?{% endblocktrans %}
{% endblock %}

{% block dashboard_content %}
    <div class="table-header">
        <h2>{% trans "Voucher details" %}</h2>
    </div>
    <div class="well">
        <table class="table table-striped table-bordered table-hover">
            <tbody>
                <tr><th>{% trans "Name" %}</th><td>{{ voucher.name }}</td></tr>
                <tr><th>{% trans "Code" %}</th><td>{{ voucher.code }}</td></tr>
                <tr><th>{% trans "Start datetime" %}</th><td>{{ voucher.start_datetime }}</td></tr>
                <tr><th>{% trans "End datetime" %}</th><td>{{ voucher.end_datetime }}</td></tr>
                <tr><th>{% trans "Usage" %}</th><td>{{ voucher.usage }}</td></tr>
                <tr><th>{% trans "Discount" %}</th><td>{{ voucher.benefit.description|safe }}</td></tr>
            </tbody>
        </table>
        <form method="post">
            {% csrf_token %}
            <div class="form-actions">
                <button class="btn btn-danger btn-lg" type="submit" data-loading-text="{% trans 'Deleting...' %}">{% trans "Delete" %}</button> {% trans "or" %}
                <a href="{% url 'dashboard:voucher-list' %}">{% trans "cancel" %}</a>
            </div>
        </form>
    </div>
{% endblock dashboard_content %}
